<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/22
 * Time: 11:45
 */
class 删除mysql数据库的重复记录
{

}
set_time_limit(13600);  //设置时间
$conn=mysql_connect('localhost','root',''); //连接数据库
mysql_select_db('shuju',$conn);
mysql_query("set names 'gbk'");

$query = mysql_query("select min(id) as mid from taobaoguanjianci group by title");

while($row = mysql_fetch_array($query))
{

    mysql_query("INSERT into taobaoguanjiancitmp select id,cid,title,cat,level3,cname from taobaoguanjianci where id=$row[mid]");
}
